"use strict";window.addEventListener('load',function(){immodvisor_seal.run()});var immodvisor_seal={run:function(){var widget_link,options,iframe,theme,position,rating,from_top,width,height,url_params,url,style,is_pro_domain;if(!document.getElementById('immodvisor-seal-widget')){return} widget_link=document.getElementById('immodvisor-seal-widget');options={rating:1,theme:'blue',position:'right',domain:window.location.host,api_key:'',ctype:null,folder:null,} position='right';from_top=200;width=125;if(widget_link.getAttribute('data-im-apikey')!=undefined){options.api_key=widget_link.getAttribute('data-im-apikey')} if(widget_link.getAttribute('data-im-ctype')!=undefined){options.ctype=widget_link.getAttribute('data-im-ctype')} if((theme=widget_link.getAttribute('data-im-theme'))!=undefined&&['white','blue','pink'].indexOf(theme)!=-1){options.theme=theme} if((rating=widget_link.getAttribute('data-im-mark'))!=undefined){options.rating=(rating=="false")?0:1} if((rating=widget_link.getAttribute('data-im-rating'))!=undefined){options.rating=(rating=="false")?0:1} if((position=widget_link.getAttribute('data-im-position'))!=undefined&&['left','right'].indexOf(position)!=-1){options.position=position} if(widget_link.getAttribute('data-im-top')!=undefined){var temp_from_top=widget_link.getAttribute('data-im-top').replace('px','');temp_from_top=temp_from_top.replace('px','');if(parseInt(temp_from_top,10)==temp_from_top){if(temp_from_top<0){temp_from_top=0} if(temp_from_top>300){temp_from_top=300} from_top=temp_from_top}} if(widget_link.getAttribute('data-im-width')!=undefined){var temp_width=widget_link.getAttribute('data-im-width').replace('px','');if(parseInt(temp_width,10)==temp_width){if(temp_width<100){temp_width=100} if(temp_width>150){temp_width=150} width=temp_width}} if(widget_link.getAttribute('data-im-folder')!=undefined){options.folder=widget_link.getAttribute('data-im-folder')} if(options.rating===1){height=width*2}else{height=width+20} if((is_pro_domain=widget_link.getAttribute('data-im-pro'))!=undefined){is_pro_domain=(is_pro_domain=="true")?!0:!1} if(is_pro_domain){from_top=Math.ceil(from_top/2)} style='top:'+from_top;if(is_pro_domain){style+='px;position:absolute;'}else{style+='px;position:fixed;'} if(options.position==='left'){style+='left:0;'}else{style+='right:0;'} style+='width:'+width+'px;';style+='height:'+height+'px;';style+='z-index:999999;';url_params='';for(var key in options){if(url_params!==''){url_params+="&"} url_params+=key+"="+options[key]} if(options.ctype!==null){url=widget_link.href+'seal?'+url_params+'&ctype='+options.ctype}else{url=widget_link.href+'seal?'+url_params} iframe=document.createElement('iframe');iframe.setAttribute('id','immodvisor-seal-widget-iframe');iframe.setAttribute('src',url);iframe.setAttribute('width',width+'px');iframe.setAttribute('height',height+'px');iframe.setAttribute('frameborder','0');iframe.setAttribute('scrolling','no');iframe.setAttribute('style',style);widget_link.parentNode.replaceChild(iframe,widget_link)},}